package com.goblin.model.order.po;

import com.goblin.model.base.BaseEntity;
import com.goblin.model.uaa.po.CustomerUser;
import lombok.Data;

import javax.persistence.*;
import java.util.Date;

@Data
@Table(name = "t_order_product_comment")
@Entity
public class orderProductComment extends BaseEntity {

    @Column(name = "like", columnDefinition = "int(11) COMMENT '点赞数'")
    private Integer like;

    @Column(name = "comment", columnDefinition = "varchar(255) COMMENT '评论内容'")
    private String comment;

    @Column(name = "star", columnDefinition = "int(1) COMMENT '评论星级数'")
    private Integer star;

    @Column(name = "date", columnDefinition = "datetime COMMENT '评论时间'")
    private Date date;

    @Column(name = "product_info", columnDefinition = "varchar(255) COMMENT '评论商品信息'")
    private String productInfo;

    @Column(name = "images", columnDefinition = "varchar(1000) COMMENT '评论留言照片信息'")
    private String imges;

    @OneToOne(cascade = CascadeType.MERGE, fetch = FetchType.EAGER)
    @JoinColumn(name = "user_id", referencedColumnName = "id", nullable = false, columnDefinition = " int(11) COMMENT '创建人id'")
    private CustomerUser customerUser;

    @Column(name = "nickName", columnDefinition = "varchar(255) COMMENT '评论用户昵称'")
    private String nickName;

}
